﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Engine;

namespace Estadio
{
    /// <summary>
    /// Provides common properties of an entity.
    /// </summary>
    public class Locator : ILocator
    {

        Entity parentEntity;

        /// <summary>
        /// Creates a locator from an entity.
        /// </summary>
        /// <param name="entity"></param>
        public Locator(Entity entity)
            : base()
        {
            parentEntity = entity;
        }


        #region ILocator Members

        public Vector3 Position
        {
            get { return parentEntity.Position; }
        }

        public Matrix Rotation
        {
            get
            {
                return parentEntity.Rotation;
            }
        }

        public Vector3 Scale
        {
            get { return parentEntity.Scale; }
        }

        public Matrix LocalWorld
        {
            get { return parentEntity.LocalWorld; }
        }

        public Matrix World { get { return parentEntity.World; } }

        #endregion
    }
}
